//
//  PresidentDetailTableViewController.m
//  Navi
//
//  Created by Justsoso on 16/3/7.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "PresidentDetailTableViewController.h"

@interface PresidentDetailTableViewController ()

@end

@implementation PresidentDetailTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
    self.nameTextField.text = self.pre.name;
    self.fromTextField.text = self.pre.fromYear;
    self.toTextField.text = self.pre.toYear;
    self.partyTextField.text = self.pre.party;
}
- (IBAction)saveBtnPressed:(id)sender
{
    self.pre.name = self.nameTextField.text;
    self.pre.fromYear = self.fromTextField.text;
    self.pre.toYear = self.toTextField.text;
    self.pre.party = self.partyTextField.text;
    
    [self.navigationController popViewControllerAnimated:YES];
    
    [self.delegate refresh];
}


@end
